Socket
Socket
Sign inDemoInstall

tildify

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tildify

Convert an absolute path to a tilde path: `/Users/sindresorhus/dev` → `~/dev`


Version published
Weekly downloads
1.8M
increased by1.59%
Maintainers
1
Weekly downloads
 
Created

What is tildify?

The tildify npm package is used to convert absolute paths into a tilde path, which replaces the user's home directory with a tilde (~). This can be useful for displaying paths in a more readable and user-friendly format, especially in command-line applications or logging.

What are tildify's main functionalities?

Convert absolute path to tilde path

This feature takes an absolute path and converts it to a tilde path by replacing the user's home directory with a tilde (~).

const tildify = require('tildify');
const tildePath = tildify('/Users/username/project');
console.log(tildePath); // Outputs: '~/project'

Other packages similar to tildify

Keywords

FAQs

Package last updated on 12 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc